Optimal. Leaf size=47 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a+b \tanh ^2(x)}}{\sqrt {a+b}}\right )}{\sqrt {a+b}}-\frac {\sqrt {a+b \tanh ^2(x)}}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {3751, 457, 81,
65, 214} \begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {a+b \tanh ^2(x)}}{\sqrt {a+b}}\right )}{\sqrt {a+b}}-\frac {\sqrt {a+b \tanh ^2(x)}}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 81
Rule 214
Rule 457
Rule 3751
Rubi steps
\begin {align*} \int \frac {\tanh ^3(x)}{\sqrt {a+b \tanh ^2(x)}} \, dx &=\text {Subst}\left (\int \frac {x^3}{\left (1-x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tanh (x)\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {x}{(1-x) \sqrt {a+b x}} \, dx,x,\tanh ^2(x)\right )\\ &=-\frac {\sqrt {a+b \tanh ^2(x)}}{b}+\frac {1}{2} \text {Subst}\left (\int \frac {1}{(1-x) \sqrt {a+b x}} \, dx,x,\tanh ^2(x)\right )\\ &=-\frac {\sqrt {a+b \tanh ^2(x)}}{b}+\frac {\text {Subst}\left (\int \frac {1}{1+\frac {a}{b}-\frac {x^2}{b}} \, dx,x,\sqrt {a+b \tanh ^2(x)}\right )}{b}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {a+b \tanh ^2(x)}}{\sqrt {a+b}}\right )}{\sqrt {a+b}}-\frac {\sqrt {a+b \tanh ^2(x)}}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 47, normalized size = 1.00 \begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {a+b \tanh ^2(x)}}{\sqrt {a+b}}\right )}{\sqrt {a+b}}-\frac {\sqrt {a+b \tanh ^2(x)}}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(128\) vs.
\(2(39)=78\).
time = 0.73, size = 129, normalized size = 2.74
method | result | size |
derivativedivides | \(-\frac {\sqrt {a +b \left (\tanh ^{2}\left (x \right )\right )}}{b}+\frac {\ln \left (\frac {2 a +2 b +2 b \left (\tanh \left (x \right )-1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}{\tanh \left (x \right )-1}\right )}{2 \sqrt {a +b}}+\frac {\ln \left (\frac {2 a +2 b -2 b \left (1+\tanh \left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}{1+\tanh \left (x \right )}\right )}{2 \sqrt {a +b}}\) | \(129\) |
default | \(-\frac {\sqrt {a +b \left (\tanh ^{2}\left (x \right )\right )}}{b}+\frac {\ln \left (\frac {2 a +2 b +2 b \left (\tanh \left (x \right )-1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}{\tanh \left (x \right )-1}\right )}{2 \sqrt {a +b}}+\frac {\ln \left (\frac {2 a +2 b -2 b \left (1+\tanh \left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}{1+\tanh \left (x \right )}\right )}{2 \sqrt {a +b}}\) | \(129\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 530 vs.
\(2 (39) = 78\).
time = 0.44, size = 1625, normalized size = 34.57 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\tanh ^{3}{\left (x \right )}}{\sqrt {a + b \tanh ^{2}{\left (x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 345 vs.
\(2 (39) = 78\).
time = 0.62, size = 345, normalized size = 7.34 \begin {gather*} -\frac {\log \left ({\left | -{\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )} {\left (a + b\right )} - \sqrt {a + b} {\left (a - b\right )} \right |}\right )}{2 \, \sqrt {a + b}} + \frac {\log \left ({\left | -\sqrt {a + b} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} + \sqrt {a + b} \right |}\right )}{2 \, \sqrt {a + b}} - \frac {\log \left ({\left | -\sqrt {a + b} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} - \sqrt {a + b} \right |}\right )}{2 \, \sqrt {a + b}} - \frac {4 \, {\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} - \sqrt {a + b}\right )}}{{\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )}^{2} + 2 \, {\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )} \sqrt {a + b} + a - 3 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.69, size = 39, normalized size = 0.83 \begin {gather*} \frac {\mathrm {atanh}\left (\frac {\sqrt {b\,{\mathrm {tanh}\left (x\right )}^2+a}}{\sqrt {a+b}}\right )}{\sqrt {a+b}}-\frac {\sqrt {b\,{\mathrm {tanh}\left (x\right )}^2+a}}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________